//
//  MahjongDataView.m
//  Mahjong
//
//  Created by 饶首建 on 17/6/30.
//  Copyright © 2017年 com.ikamobile.com. All rights reserved.
//

#import "MahjongDataView.h"
#import "HWPopTool.h"

@interface MahjongDataView()<UIGestureRecognizerDelegate>

@end

@implementation MahjongDataView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (void)awakeFromNib{
    [super awakeFromNib];
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithActionBlock:^(id  _Nonnull sender) {
        [[HWPopTool sharedInstance]closeWithBlcok:^{}];
    }];
    tap.delegate = self;
    [self addGestureRecognizer:tap];
    
    
}

+(instancetype)mahjongDataView{
    return [[[NSBundle mainBundle] loadNibNamed:@"MahjongDataView"
                                          owner:nil options:nil]lastObject];
}

- (IBAction)closeAction:(id)sender {
    [[HWPopTool sharedInstance]closeWithBlcok:^{
        
    }];
}

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{
    // 取消响应手势
    if (touch.view == self){
        return YES;
    }
    return NO;
}

@end
